{% extends 'tests/page.html' %}

{% block content %}
<form method="post" action=".">{% csrf_token %}
	<table>
		<tr>
			<td></td>
			<td><label for="id_question">Вопрос:</label></td>
			<td>{{ form.question }}</td>
		</tr> 
		<tr>
			<td>
				<input type="radio" name="answer" id="answer1" value="1" {% if form.instance.answer == 1 %} checked="checked" {% endif %} />
			</td>
			<td><label for="answer1">Вариант ответа №1:</label></td>
			<td>{{ form.option1 }}</td>
		</tr> 
		<tr>
			<td>
				<input type="radio" name="answer" value="2" {% if form.instance.answer == 2 %} checked="checked" {% endif %} />
			</td>
			<td><label for="answer2">Вариант ответа №2:</label></td>
			<td>{{ form.option2 }}</td>
		</tr> 
		<tr>
			<td>
				<input type="radio" name="answer" value="3" {% if form.instance.answer == 3 %} checked="checked" {% endif %} />
			</td>
			<td><label for="answer3">Вариант ответа №3:</label></td>
			<td>{{ form.option3 }}</td>
		</tr> 
		<tr>
			<td>
				<input type="radio" name="answer" value="4" {% if form.instance.answer == 4 %} checked="checked" {% endif %} />
			</td>
			<td><label for="answer4">Вариант ответа №4:</label></td>
			<td>{{ form.option4 }}</td>
		</tr> 
		<tr>
			<td colspan="3"><input type="submit" value="Сохранить" /></td>
		</tr>
	</table>
</form>
{% endblock %}